package com.baymax.test.scene.internal

import android.view.View
import kotlin.properties.Delegates

/**
 * @title:       标题
 * @project:     TestScene
 * @package:     com.baymax.test.scene.internal
 * @class:       AbstractViewWrapper
 * @description:
 * <p>
 * 类描述
 * </p>
 *
 * @version:   1.0
 * @createDate:   2023/2/3 12:59
 * @Copyright (C) 2023 YSTEN
 * @author:       xuyujian
 */
abstract class Abstract21ViewWrapper(private val v: View, protected  val style: Style) {

    var width: Int by Delegates.observable(style.renderWidth) { p, o, n ->
        if (o != n) {
            val t = onChangeWidth(o, n)
            v.requestLayout()
        }
    }


    abstract fun onChangeWidth(o: Int, n: Int)

}